package com.archermind.boc.domain;

import com.archermind.boc.socket.out.IResponse;
import com.archermind.boc.xml.ApplicationContextFactory;
import com.thoughtworks.xstream.XStream;

public class IQ extends BaseDomain implements IResponse {
	private String id;
	private String from;
	private String to;
	private String type;
	private Session session;
	private Jingle jingle;
	private Video video;
	private Register register;

	public Register getRegister() {
		return register;
	}

	public void setRegister(Register register) {
		this.register = register;
	}

	private static XStream xStream = (XStream) ApplicationContextFactory.getContext().getBean("iqXStream");

	public Video getVideo() {
		return video;
	}

	public void setVideo(Video video) {
		this.video = video;
	}

	public Jingle getJingle() {
		return jingle;
	}

	public void setJingle(Jingle jingle) {
		this.jingle = jingle;
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public Session getSession() {
		return session;
	}

	public void setSession(Session session) {
		this.session = session;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String toXML() {
		return xStream.toXML(this);
	}
}
